package com.iwhalecloud.bss.kite.cucc.spec.impl.query;

import com.iwhalecloud.bss.kite.dataservice.api.IQueryOfferDisplayConfigService;
import com.iwhalecloud.bss.kite.dataservice.entity.spec.OfferDisplayConfig;
import com.iwhalecloud.bss.kite.dataservice.mapper.spec.OfferDisplayConfigMapper;
import com.ztesoft.bss.base.staticdata.CoreDataPublic;
import com.ztesoft.bss.common.util.SpringUtil;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

@Service
public class OfferDisplayConfigQueryService implements IQueryOfferDisplayConfigService {

	@Override
	public List<OfferDisplayConfig> listOfferDisplayConfigs(String regionId) {
		Example example = new Example(OfferDisplayConfig.class);
        example.createCriteria().andEqualTo("regionId", regionId).andEqualTo("statusCd", CoreDataPublic.PUB_C_0001_1000);
        return SpringUtil.getBean(OfferDisplayConfigMapper.class).selectByExample(example);
	}

}
